package com.zx.viewlearn.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.zx.viewlearn.R;
import com.zx.viewlearn.views.TopBar;

public class ViewLearnActivity8TopBar extends AppCompatActivity {
    TopBar top_bar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_learn_activity8_top_bar);
        top_bar = findViewById(R.id.top_bar);

        top_bar.setmOnClick(new TopBar.OnClick() {
            @Override
            public void leftOnclick(View view) {
                Toast.makeText(ViewLearnActivity8TopBar.this, "left click", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void rightOnclick(View view) {
                Toast.makeText(ViewLearnActivity8TopBar.this, "rightOnclick click", Toast.LENGTH_SHORT).show();

            }

            @Override
            public void titleOnclick(View view) {
                Toast.makeText(ViewLearnActivity8TopBar.this, "titleOnclick click", Toast.LENGTH_SHORT).show();

            }
        });
    }


}
